﻿using Inovout.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Inovout.YunYao.Live.Web
{
    public class MvcApplication : WebApplication
    {
        protected override void RegisterApplicationRoutes(RouteCollection routes)
        {
            routes.MapRoute(
          name: "Chart",
          url: "Chart/{node}",
          defaults: new { controller = "Chart", action = "Index" },
          constraints: new { node = @"\d+" }
      );

            routes.MapRoute(
                      name: "Node",
                      url: "{controller}/{action}/{node}/{interval}/{timestamp}",
                      defaults: new { controller = "Node", action = "Index", timestamp = UrlParameter.Optional },
                      constraints: new { node = @"\d+", interval = @"\d+" }
                  );
            base.RegisterApplicationRoutes(routes);
        }
    }
}